<template>
	<view class="order-container">
		<view class="order-title">
			订单信息
		</view>
		<view class="order-detail-item">
			<text class="order-label">订单号</text>
			<text class="order-value">{{formData.orderId}}</text>
		</view>
		<view class="order-detail-item">
			<text class="order-label">手机号</text>
			<text class="order-value">{{formData.userPhone || ''}}</text>
		</view>
		<view class="order-detail-item">
			<text class="order-label">下单时间</text>
			<text class="order-value">{{formData.createTime}}</text>
		</view>
		<view class="order-detail-item" v-if="isPayTime">
			<text class="order-label">付款时间</text>
			<text class="order-value">{{formData.payTime}}</text>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			formData: {
				type: Object,
				default: () => ({
					orderId: ''
				})
			},
			isPayTime: {
				type: Boolean,
				default: false
			}
		}
	}
</script>

<style lang="less" scoped>
	.order-container {
		background-color: #ffffff;
		border-radius: 10rpx;
		padding: 20rpx;
		margin-top: 20rpx;
	}

	.order-title {
		font-size: 32rpx;
		margin-bottom: 20rpx;
	}

	.order-detail-item {
		display: flex;
		align-items: center;
		font-size: 24rpx;
		margin-bottom: 20rpx;
	}

	.order-label {
		width: 260rpx;
		color: #666666;
	}

	.order-value {
		color: #000000;
	}
</style>
